//
//  Bird.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Bird.h"

@implementation Bird

-(id)init
{

    _name = @"鹰";
    _color = @"gray";
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %@", _name, _color);

}

-(void)fly
{

    NSLog(@"有一只%@色的%@正在飞", _color, _name);

}



-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSString *)color
{
    return _color;
}
-(void)setColor:(NSString *)color
{
    _color = color;
}
-(id)initWithName:(NSString *)name color:(NSString *)color
{

    _name = name;
    _color = color;
    return self;
    
}

+ (id)birdWithName:(NSString *)name color:(NSString *)color
{
    Bird *b = [[Bird alloc] initWithName:name color:color];
    return b;
}

@end
